
package com.fx.apartment.modules.activity.service.impl;

import com.fx.apartment.common.base.BaseServiceImpl;
import com.fx.apartment.modules.activity.entity.ActivityParticipation;
import com.fx.apartment.modules.activity.vo.ActivityParticipationVO;
import com.fx.apartment.modules.activity.mapper.ActivityParticipationMapper;
import com.fx.apartment.modules.activity.service.IActivityParticipationService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * 参与活动 服务实现类
 *
 * @author QinXueFeng
 * @since 2021-04-19
 */
@Service
public class ActivityParticipationServiceImpl extends BaseServiceImpl<ActivityParticipationMapper, ActivityParticipation> implements IActivityParticipationService {

	@Override
	public IPage<ActivityParticipationVO> selectActivityParticipationPage(IPage<ActivityParticipationVO> page, ActivityParticipationVO activityParticipation) {
		return page.setRecords(baseMapper.selectActivityParticipationPage(page, activityParticipation));
	}

	@Override
	public boolean addVotesNum(Long participationId) {
		Integer num = baseMapper.addVotesNum(participationId);
		if(num>0){
			return true;
		}
		return false;
	}

}
